<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>z运动</title>

    <style>
        .container{
            text-align:center;
            font-size: 18px;
        }

        @keyframes move{
            0%{
                transform: translateX(0);
            }
            33%{
                transform: translateX(170px);
            }
            66%{
                transform: translate(0,170px);
            }
            100%{
                transform: translate(170px,170px);
            }
        }

        .box{
            margin: 0 auto;
            width: 200px;
            height: 200px;
            background-color: #fb3;
        }

        .square{
            width: 30px;
            height: 30px;
            background-color: #58a;
            animation: move 2s infinite alternate forwards linear;
        }


    </style>
</head>
<body>
    <div class="container">
        <div class="box">
            <div class="square"></div>
        </div>
    </div>
    
</body>
</html>